<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="${basePath}css/easyui.css">
<link rel="stylesheet" type="text/css" href="${basePath}css/icon.css">
<link rel="stylesheet" type="text/css" href="${basePath}css/demo.css">
<script type="text/javascript" src="${basePath}js/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}js/jquery.easyui.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>查询玩家统计信息</title>
<script type="text/javascript">
	$(document).ready(
			function() {
				$('#w').window('close');
				/* $('#t1').datagrid({ onClickRow:
				   function () {
				       //单击行的时候，将单选按钮设置为选中
				       var id = $('#t1').datagrid("getSelected");
				       $("input[name='name']").each(function () {
				           if ($(this).val() == id.Id) {
				               $(this).attr("checked", true);
				           }
				       });
				   }
				});  */
				$('#t1').datagrid({
					singleSelect : (this.value == 1)
				});
				$('#queryStastics').click(function(){
					var rowServers = getSelectedServers();
				  	if(rowServers.length==0 || rowServers.length==0){
					  	return;
				  	}
				  	var requestParams="{\"servers\":";
					  requestParams += "["
					  $.each(rowServers, function(index, value){
						  requestParams += "{\"tag\"" + ":\"" + value['serverId'] + '_' + value['serverName'] + "\"},";			                     
					  });
					  requestParams = requestParams.substring(0, requestParams.length - 1);
					  requestParams += "]";
					  requestParams += "}";
					  var url = "QueryLVDistribution?paras=" + requestParams; 
					  $.post(url, function(data){
					  });
				});
				$('#queryEverydayLogin').click(function(){
					var rowServers = getSelectedServers();
				  	if(rowServers.length==0 || rowServers.length==0){
					  	return;
				  	}
				  	var requestParams="{\"servers\":";
					  requestParams += "["
					  $.each(rowServers, function(index, value){
						  requestParams += "{\"tag\"" + ":\"" + value['serverId'] + '_' + value['serverName'] + "\"},";			                     
					  });
					  requestParams = requestParams.substring(0, requestParams.length - 1);
					  requestParams += "]";
					  requestParams += "}";
					  var url = "QueryEverydayLoginServlet?paras=" + requestParams; 
					  $.post(url, function(data){
					});
				});
			});

</script>
</head>
<body class="easyui-layout">
	<div data-options="region:'north',border:false"
		style="height: 60px; background: #B3DFDA; padding: 10px"></div>
	<div data-options="region:'west',split:true,title:' '"
		style="width: 20%; padding: 10px;">
	</div>
	<div data-options="region:'center',title:' '" style="width: 80%">
		<jsp:include page="gm/gmServersMul.jsp" />
		<div class="easyui-panel" title="" style="width: 100%">
		<div style="padding: 10px 60px 20px 60px">
			<div style="text-align: center; padding: 5px">
				<a href="#" class="easyui-linkbutton" id="queryStastics">查询等级分布</a> 
			</div>
			<div style="text-align: center; padding: 5px">
				<a href="#" class="easyui-linkbutton" id="queryEverydayLogin">查询每日登录次数</a>
			</div>
		</div>
	</div>
	</div>
	<div id="w" class="easyui-window" title="Basic Window" data-options="iconCls:'icon-save'" style="width:500px;height:200px;padding:10px;" maximized="true" collapsible="false" minimizable="false">
		The window content.
	</div>
	
</body>
</html>